package com.jzo2o.customer.controller.agency;

import com.jzo2o.customer.model.dto.request.AgencyCertificationAuditAddReqDTO;
import com.jzo2o.customer.model.dto.response.AgencyCertificationAuditResDTO;
import com.jzo2o.customer.service.IAgencyCertificationService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 机构端认证相关接口
 *
 **/
@RestController("AgencyCertificationAuditController")
@RequestMapping("/agency/agency-certification-audit")
@Api(tags = "机构端 - 实名相关接口")
public class AgencyCertificationAuditController {
    @Autowired
    private IAgencyCertificationService agencyCertificationService;

    /**
     * 提交认证申请
     * 接口路径：POST  /customer/agency/agency-certification-audit
     * 请求数据类型: application/json
     */
    @PostMapping
    public void submitCertificationAudit(@RequestBody AgencyCertificationAuditAddReqDTO dto) {
        agencyCertificationService.submitCertificationAudit(dto);
    }
    /**
     * 查询最新的驳回原因
     * 接口路径：GET /customer/agency/agency-certification-audit/rejectReason
     * 请求数据类型： application/x-www-form-urlencoded
     */
    @GetMapping("/rejectReason")
    public AgencyCertificationAuditResDTO showRejectReason(){
        return agencyCertificationService.showRejectReason();
    }
}
